package com.ruoyi.fee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fee.mapper.WWarehouseFeeRuleMapper;
import com.ruoyi.fee.domain.WWarehouseFeeRule;
import com.ruoyi.fee.service.IWWarehouseFeeRuleService;

/**
 * 仓储费Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 11:22:51
 */
@Service
public class WWarehouseFeeRuleServiceImpl implements IWWarehouseFeeRuleService 
{
    @Autowired
    private WWarehouseFeeRuleMapper wWarehouseFeeRuleMapper;

    /**
     * 查询仓储费
     * 
     * @param warehouseFeeId 仓储费主键
     * @return 仓储费
     */
    @Override
    public WWarehouseFeeRule selectWWarehouseFeeRuleByWarehouseFeeId(Long warehouseFeeId)
    {
        return wWarehouseFeeRuleMapper.selectWWarehouseFeeRuleByWarehouseFeeId(warehouseFeeId);
    }

    /**
     * 查询仓储费列表
     * 
     * @param wWarehouseFeeRule 仓储费
     * @return 仓储费
     */
    @Override
    public List<WWarehouseFeeRule> selectWWarehouseFeeRuleList(WWarehouseFeeRule wWarehouseFeeRule)
    {
        return wWarehouseFeeRuleMapper.selectWWarehouseFeeRuleList(wWarehouseFeeRule);
    }

    /**
     * 新增仓储费
     * 
     * @param wWarehouseFeeRule 仓储费
     * @return 结果
     */
    @Override
    public int insertWWarehouseFeeRule(WWarehouseFeeRule wWarehouseFeeRule)
    {
        wWarehouseFeeRule.setCreateTime(DateUtils.getNowDate());
        return wWarehouseFeeRuleMapper.insertWWarehouseFeeRule(wWarehouseFeeRule);
    }

    /**
     * 修改仓储费
     * 
     * @param wWarehouseFeeRule 仓储费
     * @return 结果
     */
    @Override
    public int updateWWarehouseFeeRule(WWarehouseFeeRule wWarehouseFeeRule)
    {
        wWarehouseFeeRule.setUpdateTime(DateUtils.getNowDate());
        return wWarehouseFeeRuleMapper.updateWWarehouseFeeRule(wWarehouseFeeRule);
    }

    /**
     * 批量删除仓储费
     * 
     * @param warehouseFeeIds 需要删除的仓储费主键
     * @return 结果
     */
    @Override
    public int deleteWWarehouseFeeRuleByWarehouseFeeIds(Long[] warehouseFeeIds)
    {
        return wWarehouseFeeRuleMapper.deleteWWarehouseFeeRuleByWarehouseFeeIds(warehouseFeeIds);
    }

    /**
     * 删除仓储费信息
     * 
     * @param warehouseFeeId 仓储费主键
     * @return 结果
     */
    @Override
    public int deleteWWarehouseFeeRuleByWarehouseFeeId(Long warehouseFeeId)
    {
        return wWarehouseFeeRuleMapper.deleteWWarehouseFeeRuleByWarehouseFeeId(warehouseFeeId);
    }

    /**
     * 查询仓储费列表
     *
     * @param customerName 仓储费
     * @return 仓储费
     */
    @Override
    public List<WWarehouseFeeRule> selectWWarehouseFeeRuleListByCustomerName(String customerName)
    {
        return wWarehouseFeeRuleMapper.selectWWarehouseFeeRuleListByCustomerName(customerName);
    }
}
